/*** 
 * @Author: fuhongliang-TSJ hongliang.fu@4d-bios.com
 * @Date: 2025-09-03 15:14:42
 * @LastEditTime: 2025-09-03 18:14:21
 * @LastEditors: fuhongliang-TSJ hongliang.fu@4d-bios.com
 * @Description: 
 * @FilePath: \lc_-esp32_-s3\components\bsp\sdio\sd_card.h
 * @立创实战派ESP32-S3开发板
 * @Copyright (c) 2025 by 4D Bios, All Rights Reserved. 
 */
#ifndef __SD_CARD_H_
#define __SD_CARD_H_

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "esp_vfs_fat.h"
#include "sdmmc_cmd.h"
#include "driver/sdmmc_host.h"

/* 引脚定义 */
#define BSP_SD_CLK      GPIO_NUM_47
#define BSP_SD_CMD      GPIO_NUM_48
#define BSP_SD_D0       GPIO_NUM_21
#define MOUNT_POINT     "/sdcard"

/* 函数声明 */
esp_err_t sd_init(void);                                                    /* SD卡初始化 */
esp_err_t sd_unmount(void);                                                 /* 卸载SD卡 */
void sd_get_fatfs_usage(size_t *out_total_bytes, size_t *out_free_bytes);   /* 获取SD卡相关信息 */

#endif